import request from "../utils/request";

//条件分页查询
export const querySupplierPageApi = (name,page,pageSize) => {return request.get(`/supplier?name=${name}&page=${page}&pageSize=${pageSize}`)};

//添加供应商
export const addSupplierApi = (data) => {return request.post('/supplier',data)};

//根据id查询
export const querySupplierByIdApi = (id) => {return request.get(`/supplier/${id}`)};

//修改供应商
export const updateSupplierApi = (data) => {return request.put('/supplier',data)};

//删除供应商
export const deleteSupplierByIdApi = (id) => {return request.delete(`/supplier/${id}`)};

//查询所有供应商
export const getSupplierAllList = () => {return request.get(`/supplier/all`)};